<html>
<head><meta charset="utf-8"><title>what is a landing pad? · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/what.20is.20a.20landing.20pad.3F.html">what is a landing pad?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="203777403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/what%20is%20a%20landing%20pad%3F/near/203777403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jason Hu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/what.20is.20a.20landing.20pad.3F.html#203777403">(Jul 13 2020 at 22:05)</a>:</h4>
<p>specifically, I am trying to understand the MIR instructions, resume and abort. to my understanding, resume resumes unwinding of stack while abort aborts it. what bothers me is that the doc says "landing pad is finished". what specifically does that mean? hope that is not a dumb question.</p>



<a name="203792041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/what%20is%20a%20landing%20pad%3F/near/203792041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/what.20is.20a.20landing.20pad.3F.html#203792041">(Jul 14 2020 at 01:59)</a>:</h4>
<p><span class="user-mention" data-user-id="320010">@Jason Hu</span> that sounds too level, did it leak into MIR docs?</p>



<a name="203792043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/what%20is%20a%20landing%20pad%3F/near/203792043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/what.20is.20a.20landing.20pad.3F.html#203792043">(Jul 14 2020 at 01:59)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="123586">@nagisa</span> <span class="user-mention" data-user-id="124289">@Hanna Kruppe</span></p>



<a name="203792107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/what%20is%20a%20landing%20pad%3F/near/203792107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/what.20is.20a.20landing.20pad.3F.html#203792107">(Jul 14 2020 at 02:00)</a>:</h4>
<p><span class="user-mention" data-user-id="320010">@Jason Hu</span> a "landing pad" is effectively a catch/finally/cleanup "entry point", that unwinding will start executing</p>



<a name="203792117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/what%20is%20a%20landing%20pad%3F/near/203792117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/what.20is.20a.20landing.20pad.3F.html#203792117">(Jul 14 2020 at 02:00)</a>:</h4>
<p>an exception "lands" there, and unwinding only resumes when the landing pad explicitly does that - it's also possible to not do that, and that's what a "catch" in C++ does</p>



<a name="203792124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/what%20is%20a%20landing%20pad%3F/near/203792124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/what.20is.20a.20landing.20pad.3F.html#203792124">(Jul 14 2020 at 02:00)</a>:</h4>
<p>yeah its wrong doc. Its on top of Resume/Abort terminators</p>



<a name="203792134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/what%20is%20a%20landing%20pad%3F/near/203792134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/what.20is.20a.20landing.20pad.3F.html#203792134">(Jul 14 2020 at 02:01)</a>:</h4>
<p>that should say "cleanup" or something of the sort.</p>



<a name="203792146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/what%20is%20a%20landing%20pad%3F/near/203792146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/what.20is.20a.20landing.20pad.3F.html#203792146">(Jul 14 2020 at 02:01)</a>:</h4>
<p>"cleanup path"?</p>



<a name="203792284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/what%20is%20a%20landing%20pad%3F/near/203792284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jason Hu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/what.20is.20a.20landing.20pad.3F.html#203792284">(Jul 14 2020 at 02:05)</a>:</h4>
<p>I don't think there is anything wrong with it as long as all terminologies are explained.</p>



<a name="203793198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/what%20is%20a%20landing%20pad%3F/near/203793198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/what.20is.20a.20landing.20pad.3F.html#203793198">(Jul 14 2020 at 02:27)</a>:</h4>
<p><span class="user-mention" data-user-id="320010">@Jason Hu</span> it's the wrong level of abstraction: MIR has regular control-flow and cleanup control-flow, "landing pad" is at least one level lower down</p>



<a name="203793258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/what%20is%20a%20landing%20pad%3F/near/203793258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/what.20is.20a.20landing.20pad.3F.html#203793258">(Jul 14 2020 at 02:29)</a>:</h4>
<p>in the sense that cleanup edges from <code>Call</code>/<code>Assert</code>/<code>Drop</code> terminators will generate an exception-handling "landing pad", but MIR data types is not the place to document codegen</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>